package pssums


func twoSum(nums []int, target int) []int {
    table := make(map[int]int)

    for i, x := range nums {
        val, status := table[target-x]
        if status {
            return []int{val, i}
        }
        table[x] = i
    }
    return nil
}
